//
//  THTabBarButton.m
//  YJB
//
//  Created by YJB on 2016/11/26.
//  Copyright © 2016年 YJB. All rights reserved.
//

#import "THTabBarButton.h"

@implementation THTabBarButton
- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        self.titleLabel.font = FONT(12);
        self.titleLabel.textAlignment = NSTextAlignmentCenter;
    }
    return self;
}


-(void)layoutSubviews
{
    [super layoutSubviews];
    self.imageView.width = 23;
    self.imageView.height = self.imageView.width;
    self.imageView.y = 0;
    self.imageView.x = (self.width - self.imageView.width) * 0.5;
    
    self.titleLabel.x = 0;
    self.titleLabel.width = self.width;
    self.titleLabel.y = self.imageView.height + self.imageView.y;
    self.titleLabel.height = self.height - self.titleLabel.y;
    
    
}

@end
